8.8
HIGH CVSS 3.1
CVE-2026-22031
Fastify Middie Middleware Path Bypass
Description

@fastify/middie is the plugin that adds middleware support on steroids to Fastify. A security vulnerability exists in @fastify/middie prior to version 9.1.0 where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., `/%61dmin` instead of `/admin`). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. Version 9.1.0 fixes the issue.

INFO

Published Date :

Jan. 19, 2026, 4:15 p.m.

Last Modified :

March 13, 2026, 2:40 p.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2026-22031 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Openjsf \@fastify\/middie
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH [email protected]
CVSS 3.1 HIGH MITRE-CVE
CVSS 3.1 HIGH [email protected]
Solution
Update @fastify/middie to version 9.1.0 or later to fix middleware bypass vulnerabilities.
  • Update @fastify/middie to version 9.1.0 or later.
  • Ensure URL decoding is handled consistently.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-22031.

URL Resource
https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba Patch
https://github.com/fastify/middie/pull/245 Issue Tracking Patch
https://github.com/fastify/middie/releases/tag/v9.1.0 Product Release Notes
https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p Exploit Vendor Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-22031 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-22031 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-22031 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-22031 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Mar. 13, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CPE Configuration OR *cpe:2.3:a:openjsf:@fastify/middie:*:*:*:*:*:fastify:*:* versions up to (excluding) 9.1.0
    Added Reference Type GitHub, Inc.: https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba Types: Patch
    Added Reference Type GitHub, Inc.: https://github.com/fastify/middie/pull/245 Types: Issue Tracking, Patch
    Added Reference Type GitHub, Inc.: https://github.com/fastify/middie/releases/tag/v9.1.0 Types: Product, Release Notes
    Added Reference Type GitHub, Inc.: https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p Types: Exploit, Vendor Advisory
  • New CVE Received by [email protected]

    Jan. 19, 2026

    Action Type Old Value New Value
    Added Description @fastify/middie is the plugin that adds middleware support on steroids to Fastify. A security vulnerability exists in @fastify/middie prior to version 9.1.0 where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., `/%61dmin` instead of `/admin`). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. Version 9.1.0 fixes the issue.
    Added CVSS V3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
    Added CWE CWE-177
    Added Reference https://github.com/fastify/middie/commit/d44cd56eb724490babf7b452fdbbdd37ea2effba
    Added Reference https://github.com/fastify/middie/pull/245
    Added Reference https://github.com/fastify/middie/releases/tag/v9.1.0
    Added Reference https://github.com/fastify/middie/security/advisories/GHSA-cxrg-g7r8-w69p
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.